package com.hzy.service;

import com.hzy.dao.ContactMapper;
import com.hzy.pojo.Contact;
import com.hzy.pojo.ContactExample;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Package: com.hzy.service
 * @ClassName: ContactServiceImpl
 * @Author: 862982795
 * @CreateTime: 2021/09/03 15:15
 * @Description:
 */
@Transactional
@Service
public class ContactServiceImpl implements ContactService {
    @Resource
    private ContactMapper contactMapper;

    @Override
    public long countByExample(ContactExample example) {
        return contactMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(ContactExample example) {
        return contactMapper.deleteByExample(example);
    }

    @Override
    public int insert(Contact record) {
        return contactMapper.insert(record);
    }

    @Override
    public int insertSelective(Contact record) {
        return contactMapper.insertSelective(record);
    }

    @Override
    public List<Contact> selectByExample(ContactExample example) {
        return contactMapper.selectByExample(example);
    }

    @Override
    public Contact selectContactById(Integer id) {
        return contactMapper.selectContactById(id);
    }

    @Override
    public int updateByExampleSelective(Contact record, ContactExample example) {
        return contactMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(Contact record, ContactExample example) {
        return contactMapper.updateByExample(record, example);
    }
}
